


const Calculator = artifacts.require("Calculator");
const { assert } = require("chai");

contract("Calculator", () => {
    let calculator;

    before(async () => {
        calculator = await Calculator.deployed();
    });

    it("should correctly add two numbers", async () => {
        const result = await calculator.add(2, 3);
        assert.equal(result.toNumber(), 5, "The sum of 2 and 3 should be 5");
    });

    it("should correctly subtract two numbers", async () => {
        const result = await calculator.subtract(5, 3);
        assert.equal(result.toNumber(), 2, "The difference of 5 and 3 should be 2");
    });
});
